/*
 * @Author: JiLin
 * @Date: 2023-04-09 11:33:14
 * @LastEditors: JiLin
 * @LastEditTime: 2023-04-09 11:35:50
 * @FilePath: \web\src\router\index.js
 */
import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('../views/Home.vue')
const Login = () => import('../views/Login.vue')
Vue.use(VueRouter)

const routes = [
    {
        // 主路由
        path: '/',
        redirect: '/home',
    },
    {
        // Home组件
        path: '/home',
        name: 'home',
        component: Home,
    },
    {
        // 登陆
        path: '/login',
        name: 'login',
        component: Login
    },
]

const router = new VueRouter({
    mode: 'history',
    routes
})

export default router
